report = new com.openbravo.pos.reports.PanelReportBean();

report.setTitleKey("Menu.UserTip");
report.setReport("/com/openbravo/reports/usertips");
report.setResourceBundle("com/openbravo/reports/usertips_messages");

report.setSentence("SELECT PEOPLE.NAME, MIN(RECEIPTS.DATENEW) AS STARTDATE, MAX(RECEIPTS.DATENEW) AS ENDDATE, SUM(PAYMENTS.TIP) AS TOTAL " +
                "FROM PEOPLE, RECEIPTS, TICKETS, PAYMENTS WHERE PEOPLE.ID = TICKETS.PERSON AND RECEIPTS.ID = TICKETS.ID AND TICKETS.ID = PAYMENTS.RECEIPT AND ?(QBF_FILTER) " +
                "GROUP BY PEOPLE.NAME ORDER BY PEOPLE.NAME");
report.addParameter("RECEIPTS.DATENEW");
report.addParameter("RECEIPTS.DATENEW");
report.addQBFFilter(new com.openbravo.pos.reports.JParamsDatesInterval());

report.addField("NAME", com.openbravo.data.loader.Datas.STRING);
report.addField("STARTDATE", com.openbravo.data.loader.Datas.TIMESTAMP);
report.addField("ENDDATE", com.openbravo.data.loader.Datas.TIMESTAMP);
report.addField("TOTAL", com.openbravo.data.loader.Datas.DOUBLE);

report;
